/**
 * 搭子社区
 */

import { request } from "../utils/request"


export const getById = (id) =>{
	return request({
		url:"/bbs/getById",
		method:"get",
		data:id
	})
}

export const bbsList = (params) => {
    return request({
        url: "/bbs/page",
        method: "GET",
		header: {
		    "Authorization": null
		},
        data: params,
    })
}
export const mybbsList = (params = {}) => {
    return request({
        url: "/bbs/mypage",
        method: "GET",
        data: params
    })
}


export const bbsCreate = (params) => {
    return request({
        url: "/bbs/create",
        data: params,
    })
}
export const bbsDelete = (params) => {
    // console.log(params)
    return request({
        url: "/bbs/remove",
        data: params,
        header: {
            "Content-Type": "application/x-www-form-urlencoded"
        }
    })
}
export const bbsUpdate = (params) => {
    return request({
        url: "/bbs/update",
        data: params
    })
}
